from celery_tasks.main import celery_app
from celery_tasks.sms.yuntongxun import sms


@celery_app.task
def send_sms_code(mobile, sms_code):
    print("已经发送")
    ccp = sms.CCP()
    result = ccp.send_template_sms(mobile, [sms_code, 5], 1)
    if result == 0:
        print("发送成功")
    else:
        print("发送失败")
    return True